UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vPUYbRdbAazonFMuID79V38ReJlQa4M4UPQuaVSRLV4='
WHERE
key_id = '614992de5b1445b631d1a4f3afe47cdfc44e30c035b753828d2f076ea4fcacd1'
AND (
token = 'vPUYbRdbAazonFMuID79V38ReJlQa4M4UPQuaVSRLV4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)