UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jFr15v2L0gnn7D3IwLF5QfeMB/S8TO6tEWWDGprP4nQ='
WHERE
key_id = '7cd88cd2092349abbd974da38c7be79dfa069ccdffd70045d069ac6c965df419'
AND (
token = 'jFr15v2L0gnn7D3IwLF5QfeMB/S8TO6tEWWDGprP4nQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)