UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'clECWPLbEVYXYdNs+pvfRMt6Ep+IiSDK7eIXc9rjd0o='
WHERE
key_id = '38ded912ae32c7da7210d3f1b6d94473c4c5c3fcd91953cdea1d782774cddddb'
AND (
token = 'clECWPLbEVYXYdNs+pvfRMt6Ep+IiSDK7eIXc9rjd0o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)