UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LPSUGbrLmuCZrKiqFUaYhjkpVj9ZdSQ6XoA/5ekhahA='
WHERE
key_id = '6f63c66bb7e687c78ec6c16b1b09cf9c6bd96394d38beed6081b8ea40391cf6b'
AND (
token = 'LPSUGbrLmuCZrKiqFUaYhjkpVj9ZdSQ6XoA/5ekhahA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)