UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jZ1qOYqxkM1ezd0u7RXNRAz7GMbVGcTXIE8RB9zwf/8=' 
WHERE 
  key_id = 'b1d039358298f93dc90c53a88f0aca35b5ae9333e3cffeb49b5f8a5f60567a14' 
  AND (
    token = 'jZ1qOYqxkM1ezd0u7RXNRAz7GMbVGcTXIE8RB9zwf/8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027