UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fGjTPybLrRQpGR6YgT/q5pzFWcvfLXmQItTkPGo7BPc='
WHERE
key_id = '370a6722f058c959dee9f2a3cfbc9a50d0cd96ae1eaf0c0c9c200a0868f3b8de'
AND (
token = 'fGjTPybLrRQpGR6YgT/q5pzFWcvfLXmQItTkPGo7BPc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)