UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F5+DLpuVcJQ4wOsioMgd7QRADQlhId9wpETU0SQfboI='
WHERE
key_id = '8706cdda8e584cb43f20b6d1f14c340cc74463a52d8f42b6d77e2722dc05ef65'
AND (
token = 'F5+DLpuVcJQ4wOsioMgd7QRADQlhId9wpETU0SQfboI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)