UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dr32C5mMRmnBZN3atZ3RDXc9tRyGc92Bk7yDnjX+u90='
WHERE
key_id = '61a3733eda1153fd006fc07607f31b10c48e6299c8cd58ffc40fc438fc0c07a2'
AND (
token = 'Dr32C5mMRmnBZN3atZ3RDXc9tRyGc92Bk7yDnjX+u90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)