UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sXWZ9MtSqxwj5OVmL/f+N/9fcah7QfnGp0r8McPIjk4=' 
WHERE 
  key_id = '5cf5c4256d25fbe0eb5430577ba4a2761ec192d6cad0e38a8fb78cfaca83e94a' 
  AND (
    token = 'sXWZ9MtSqxwj5OVmL/f+N/9fcah7QfnGp0r8McPIjk4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018