UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o8KbcvjZ8MXj8nszMz5/TpvjKtAsxiP/mO29BELs29c='
WHERE
key_id = '9c20569d69807d0f1aea8611910c4adf77754a8fa7adb72432bfb37582e571d5'
AND (
token = 'o8KbcvjZ8MXj8nszMz5/TpvjKtAsxiP/mO29BELs29c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)