UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pfmTRagjBPDtLcyeugqOxGZn4PV2V/v4shORMTMugDY='
WHERE
key_id = '1c55b9e34fc8497c3e6f925ddc8a5d11159a0c318f0f7d4ad885f33a03460a19'
AND (
token = 'pfmTRagjBPDtLcyeugqOxGZn4PV2V/v4shORMTMugDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)