UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UXhaZv0/eyuEufXukGsHO3fDFJ/psrv2r8R9pqSRpX8='
WHERE
key_id = '3c72c9f03caa88b5461235030ed0f7150ddb88792fc6872b0a752d2759ddbc5f'
AND (
token = 'UXhaZv0/eyuEufXukGsHO3fDFJ/psrv2r8R9pqSRpX8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)