UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jISpmZ0WANEsiHywv2rdZtj35s17ECuEY8cpvZrHdnE='
WHERE
key_id = '046cb073251d308f698d0ba64c69986453dd5b57bdb1ee4cf1feb81156b553a2'
AND (
token = 'jISpmZ0WANEsiHywv2rdZtj35s17ECuEY8cpvZrHdnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)