UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V2CX8e7LCC4nEtOmcgw7xh6Aw32MR3Phu8nZJpGS28I='
WHERE
key_id = '6f8ff35a233cdcf84b4d25d0ba5394e576a29bb1af727f1286dd2879b4fb5bb3'
AND (
token = 'V2CX8e7LCC4nEtOmcgw7xh6Aw32MR3Phu8nZJpGS28I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)