UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'J53ZlEdlxTctwaW4gA7nu2zEHvPTEEvCuTHIrc7NxzA='
WHERE
key_id = '5fd6c8dd6db1ff7ca1ffe5280bd1c51029fdce4d79c9c9e508dbbfe5a86534e7'
AND (
token = 'J53ZlEdlxTctwaW4gA7nu2zEHvPTEEvCuTHIrc7NxzA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)