UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7RTiojTJsmZlK/RoSxqGm5CU4CI880DdOVbcqKRqpaA='
WHERE
key_id = '8fa6beaf1bcb7f6ec8fc73bf863520b3410456164ec37074c683b1db454a6e88'
AND (
token = '7RTiojTJsmZlK/RoSxqGm5CU4CI880DdOVbcqKRqpaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)