UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LfUVM2QW4YoCk9oLq5M9SGvlVatwgOrxW0bpbezLMWI='
WHERE
key_id = '0fb09acd44ade0fdd7ab484d6efcca8611b4f561caecafc7cec2ef1fd6eb9b03'
AND (
token = 'LfUVM2QW4YoCk9oLq5M9SGvlVatwgOrxW0bpbezLMWI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)