UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'h9lpIaXKknsSGtr9Tz2YlEklzsO+SrIfpy10ZKIs0ZU=' 
WHERE 
  key_id = '255783d23d384ddd93357a1954e82700c8e3c846d868cc22703819fa53730e7e' 
  AND (
    token = 'h9lpIaXKknsSGtr9Tz2YlEklzsO+SrIfpy10ZKIs0ZU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047