UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DCxUycKKza51xD5m0ixtDzkTPxdj8mMEXhziLrpp04I='
WHERE
key_id = 'a86b75661796db211802c8fc82890387c9898800d8bc3a3073781a6fabbd86eb'
AND (
token = 'DCxUycKKza51xD5m0ixtDzkTPxdj8mMEXhziLrpp04I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)