UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OQfcBvCHew3hcewllyrLxpUozRPVzDLyKAvAcZ2bJS8='
WHERE
key_id = '73f26e36e1f378d97a052347ff0135f1d798cfdff1fb1f36cc4ef33171e89365'
AND (
token = 'OQfcBvCHew3hcewllyrLxpUozRPVzDLyKAvAcZ2bJS8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)