UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FxwK0YXg9MxgeVEVrK/Vf8DYkpfi9hyk2XEWbLFYTWY='
WHERE
key_id = '98a95d32aa6182091becfca8d8cad4f98de2b3f204507a136102bb93ff36a7e6'
AND (
token = 'FxwK0YXg9MxgeVEVrK/Vf8DYkpfi9hyk2XEWbLFYTWY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)