UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fPNt0mwjg+iogMTFZFQ/fyEqXaOKf2pkJQdBJ69fg8Y=' 
WHERE 
  key_id = '2dfc75b5434e98732f29b28db72336c174801030bbf18dcdcc9bfe83c96b24cc' 
  AND (
    token = 'fPNt0mwjg+iogMTFZFQ/fyEqXaOKf2pkJQdBJ69fg8Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039