UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pMDAcVR2826SfSrDItvgiQ/VJsmQFN0lR0dgJPlISsg='
WHERE
key_id = 'c4666d96a4aa0d02f586667c5de1fbbbe49de4bd8d2d0f45e0c96926feb5cd3c'
AND (
token = 'pMDAcVR2826SfSrDItvgiQ/VJsmQFN0lR0dgJPlISsg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)