UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b35JZi3dZ1X197KCy60SyNzNME/XDOTD3BpR/vgZQkE='
WHERE
key_id = '7689f010a2252ffaf895aac567bbc26155f13cff4e699bf702b806079da4ff8b'
AND (
token = 'b35JZi3dZ1X197KCy60SyNzNME/XDOTD3BpR/vgZQkE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)