UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'd2+lt9rpop1B0OPB7Vlka8C1ZPGNVjrypQV9Mdju6LY='
WHERE
key_id = '916b4941ffb387d02c002a4799527aa0d5b6b94c441bed3184d7fcd00ebb90a9'
AND (
token = 'd2+lt9rpop1B0OPB7Vlka8C1ZPGNVjrypQV9Mdju6LY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)