UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'A3S1Pgq/EndjFfVCTfva5KIS4a7a0awDWQbsNXmZhjQ='
WHERE
key_id = '68e32b03a323c9e876ac4b8843e887058bb2563332d72cfffba8317b85d6a1a5'
AND (
token = 'A3S1Pgq/EndjFfVCTfva5KIS4a7a0awDWQbsNXmZhjQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)