UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AvLTSveVPo4K1AojuF9V4y1jRH10G0rIkGHKOO/5nKw='
WHERE
key_id = '751fe827ed7d70162f3f6755d121a596e4a802e33279c7edd0a60fc8f9281a51'
AND (
token = 'AvLTSveVPo4K1AojuF9V4y1jRH10G0rIkGHKOO/5nKw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)