UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/zKUERTT4vtErfwsm7qWBNMFPdBp072/1/+zXA9DbCI='
WHERE
key_id = 'f5fdc87e554013c8993d62d82df45cf1cdfd04f893fd5d81082fc7f349be74c2'
AND (
token = '/zKUERTT4vtErfwsm7qWBNMFPdBp072/1/+zXA9DbCI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)