UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bprxIsHFLYTOpWYNREV9dyxdqWbfMGOsLUUcWQHEt6k='
WHERE
key_id = '42d72a586b910389bad072f4f608142d54bef06b6cbfc9ce56ed70c65da02440'
AND (
token = 'bprxIsHFLYTOpWYNREV9dyxdqWbfMGOsLUUcWQHEt6k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)