UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ggSoh2KZukCdisPwHYNH0wjbW2NWQa4noQIqiuzJPmc='
WHERE
key_id = '159eec97a0088d06b4023a5bf5ce86234c4bc6e417146def4fede1002795798a'
AND (
token = 'ggSoh2KZukCdisPwHYNH0wjbW2NWQa4noQIqiuzJPmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)