UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/NfX7BCK3UlO+lJSJ9iW4uXSRA/h0QOKXY4BOQrhPH8='
WHERE
key_id = '151ae906d317104b6bd618f7b9a6085bfba99e62a6d403db02e6b3b7276da3c5'
AND (
token = '/NfX7BCK3UlO+lJSJ9iW4uXSRA/h0QOKXY4BOQrhPH8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)