UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hxv7mTj3Jvml0haYzJUC8G2jwI/jbTpSteXbS2jdh2Q='
WHERE
key_id = '9d33c2a60ed5077022da3f08fe8bdbfdb966d89ad4d0bae9fbec37bc7e829b66'
AND (
token = 'Hxv7mTj3Jvml0haYzJUC8G2jwI/jbTpSteXbS2jdh2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)